<template>

    <div>
        <RotateCarBox :list="obj.photoList">
        </RotateCarBox>
    </div>
</template>

<script>
    import RotateCarBox from "@/components/box/RotateCarBox";
    import {reactive} from "@vue/reactivity";
    import {onMounted} from "@vue/runtime-core";
    import service from "@/assets/js/service";
    import {errorMessage, successMessage} from "@/assets/js/utils";
    export default {
        name: "PhotoAlbum",
        components: {RotateCarBox},
        setup(){
            let obj=reactive({
                photoList:[
                    {
                        url:"",
                        content:"",
                        classify:"",
                        name:"",
                        createTime:"",


                    }
                ]
            })

            let initList=()=>{
                let data=service.getAllPictures()
                data.then(resp=>{

                    if(resp.code === 200){
                       obj.photoList=resp.data

                    }else {
                        errorMessage(resp.msg)
                    }
                })
            }
            onMounted(()=>{
                initList()
            })

            return{
                obj
            }
        }
    }
</script>

<style scoped lang="less">
    .photo-title{
        width: 100px;
        font-size: 20px;
        color:#e5e5e5;
        margin-left: 40px;
        margin-top: 50px;
        border-left: 1px solid #e5e5e5;
    }
</style>